package cn.com.lyj6851.modules.system.domain;

import cn.com.lyj6851.domain.BaseDomain;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
* 字典
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class Dict extends BaseDomain {
    private static final long serialVersionUID = -3887884459477723226L;
    /** 字典ID */
    @TableId
    private Long id;
    /** 字典名称 */
    @NotBlank(message = "字典名称不能为空")
    private String name;
    /** 描述 */
    private String remark;
    public void copy(Dict source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
